package com.yc.supermarket.entity;

import java.math.BigDecimal;
import java.util.Date;
/*销售实体类*/
public class Sales {
    private Integer saleId;
    private Integer commodityId;
    private Integer userId;
    private Integer saleQuantity;
    private BigDecimal saleAmount;
    private Integer transactionId;
    private String saleDate;
    private Commodity commodity;

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    public Integer getSaleId() {
        return saleId;
    }

    public void setSaleId(Integer saleId) {
        this.saleId = saleId;
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getSaleQuantity() {
        return saleQuantity;
    }

    public void setSaleQuantity(Integer saleQuantity) {
        this.saleQuantity = saleQuantity;
    }

    public BigDecimal getSaleAmount() {
        return saleAmount;
    }

    public void setSaleAmount(BigDecimal saleAmount) {
        this.saleAmount = saleAmount;
    }

    public Integer getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(Integer transactionId) {
        this.transactionId = transactionId;
    }

    public String getSaleDate() {
        return saleDate;
    }

    public void setSaleDate(String saleDate) {
        this.saleDate = saleDate;
    }

    public Sales(Integer saleId, Integer commodityId, Integer userId, Integer saleQuantity, BigDecimal saleAmount, Integer transactionId, String saleDate, Commodity commodity) {
        this.saleId = saleId;
        this.commodityId = commodityId;
        this.userId = userId;
        this.saleQuantity = saleQuantity;
        this.saleAmount = saleAmount;
        this.transactionId = transactionId;
        this.saleDate = saleDate;
        this.commodity = commodity;
    }

    @Override
    public String toString() {
        return "Sales{" +
                "saleId=" + saleId +
                ", commodityId=" + commodityId +
                ", userId=" + userId +
                ", saleQuantity=" + saleQuantity +
                ", saleAmount=" + saleAmount +
                ", transactionId=" + transactionId +
                ", saleDate='" + saleDate + '\'' +
                ", commodity=" + commodity +
                '}';
    }

    public Sales() {
    }


}
